<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>编辑用户</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
        <input type="text" class="text input-large" name="id" value="{$data.id}" hidden>
        <div class="form-item">
            <label class="item-label">联系电话<span class="check-tips">（登录账号）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="phone" value="{$data.phone}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">姓名<span class="check-tips">（姓名会作为默认的昵称）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$data.name}">
                <input type="hidden" name="id" value="{$data.id}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">所属分区<span class="check-tips">（用户所负责区域）</span></label>
            <div class="controls">
                <volist name="data.areaList" id="list">
                    <label>
                        <input type="checkbox" name="area[]" value="{$list.id}-{$list.areaName}"
                               <volist name="areaids" id="list2"> <eq name="list2" value="$list.id">checked</eq></volist>>
                        {$list.areaName}
                    </label>
                </volist>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">所属角色<span class="check-tips">（用户岗位）</span></label>
            <div class="controls">
                <select name="role">
                    <option value="1" {$role=="1"?'selected':''}>超人</option>
                    <option value="2" {$role=="2"?'selected':''}>区总</option>
                </select>
            </div>
        </div>
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('LogisticsUser/index')}');
    </script>
</block>
